﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BuilderPattern
{
    internal class ProgramBuilder
    {
        private static void Main(string[] args)
        {
            RobotBuilder oldStyleRobot = new OldRobotBuilder();
            RobotEngineer robotEngineer = new RobotEngineer(oldStyleRobot);
            robotEngineer.makeRobot();

            Robot firstRobot = robotEngineer.getRobot();
            Console.WriteLine("Robot Built");
            Console.WriteLine("Robot Head Type: " + firstRobot.getRobotHead());
            Console.WriteLine("Robot Torso Type: " + firstRobot.getRobotTorso());
            Console.WriteLine("Robot Arm Type: " + firstRobot.getRobotArms());
            Console.WriteLine("Robot Leg Type: " + firstRobot.getRobotLegs());

            RobotBuilder newStyleRobot = new NewRobotBuilder();
            RobotEngineer robotEngineer2 = new RobotEngineer(newStyleRobot);
            robotEngineer2.makeRobot();

            Robot secondRobot = robotEngineer2.getRobot();
            Console.WriteLine("Robot2 Built");
            Console.WriteLine("Robot Head Type: " + secondRobot.getRobotHead());
            Console.WriteLine("Robot Torso Type: " + secondRobot.getRobotTorso());
            Console.WriteLine("Robot Arm Type: " + secondRobot.getRobotArms());
            Console.WriteLine("Robot Leg Type: " + secondRobot.getRobotLegs());
        }
    }
}